﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
using System.Text;
using System.Collections.Specialized;

namespace TwentyTree4Umbraco
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {


            List<KeyValuePair<string, string>> list = new List<KeyValuePair<string, string>>();
            list.Add(new KeyValuePair<string, string>("user_id", "453862"));
            string api_signature = Signature.Create(list);

            MultipartForm form;
            form = new MultipartForm("http://" + Config.GetSetting("domain") + "/api/photo/upload");
            form.FileContentType = "application/octet-stream";
            form.setField("user_id", "453862");
            form.setField("api_signature", api_signature);
            form.sendFile("c:\\VID00134.AVI"); 
            string test = form.ResponseText.ToString();

        }
    }
}
